<template>
  <el-dialog :title="!dataForm.id ? '审核' : '编辑'" :close-on-click-modal="false" :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px">
      <el-form-item label="手机号码" prop="name">
         <el-input :disabled="true"></el-input>
      </el-form-item>
      <el-form-item  label="会员等级" prop="type">
        <el-select v-model="value" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.name"
              :value="item.value">
            </el-option>
          </el-select>
      </el-form-item>
      <el-form-item  label="新密码" prop="type">
        <el-input  placeholder=""></el-input>
      </el-form-item>
      <el-form-item  label="确认密码" prop="type">
        <el-input  placeholder=""></el-input>
      </el-form-item>
      <el-form-item  label="账户启用状态" prop="type">
        <el-switch
          v-model="status"
          active-color="#13ce66"
          inactive-color="#ff4949">
        </el-switch>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
  import {treeDataTranslate} from '@/utils'

  export default {
    data () {
      return {
        visible: false,
        is_pass: 1,
        status: 0, // 状态
        dataForm: {
          id: '0'
        },
        value: 1,
        options: [
          {
            name: '图片内容不符合',
            value: 0
          }, {
            name: '直播时间过长',
            value: 1
          }, {
            name: '其它',
            value: 2
          }
        ],
        dataRule: {

        }
      }
    },

    methods: {
      init (id) {
        this.dataForm.id = id || 0
        this.visible = true
        // this.$nextTick(() => {
        //   this.$refs['dataForm'].resetFields()
        // })
      }
    }
  }
</script>

<style lang="scss">

</style>
